home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // DBTables.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
- // From: DBTables.pas
- //----------------------------------------------------------------------------
- #ifndef DBTablesHPP
- #define DBTablesHPP
- //----------------------------------------------------------------------------
- #include <DB.hpp>
- #include <Mask.hpp>
- #include <Graphics.hpp>
- #include <Controls.hpp>
- #include <Classes.hpp>
- #include <Bde.hpp>
- #include <Windows.hpp>
- #include <SysUtils.hpp>
- #include <System.hpp>
- #pragma warn -par
- #pragma warn -hid
- #pragma warn -inl
-
- namespace Dbtables
- {
- //-- type declarations -------------------------------------------------------
- enum DBTables_1 { ixPrimary, ixUnique, ixDescending, ixCaseInsensitive, ixExpression };
-
- typedef Set<DBTables_1, ixPrimary, ixExpression> TIndexOptions;
-
- class __declspec(delphiclass) TIndexDef;
- class __declspec(delphiclass) TIndexDefs;
- class __declspec(delphiclass) TTable;
- class __declspec(delphiclass) TTableDataLink;
- class __declspec(pascalimplementation) TTableDataLink : public Db::TDataLink
- {
- typedef Db::TDataLink inherited;
-
- private:
- TTable* FTable;
- System::AnsiString FFieldNames;
- Classes::TList* FFields;
- void __fastcall SetFieldNames(const System::AnsiString Value);
-
- protected:
- virtual void __fastcall ActiveChanged(void);
- virtual void __fastcall CheckBrowseMode(void);
- virtual void __fastcall LayoutChanged(void);
- virtual void __fastcall RecordChanged(Db::TField* Field);
-
- public:
- __fastcall TTableDataLink(TTable* Table);
- __fastcall virtual ~TTableDataLink(void);
- };
-
- enum TTableType { ttDefault, ttParadox, ttDBase, ttASCII };
-
- typedef System::AnsiString TIndexName;
-
- enum TLockType { ltReadLock, ltWriteLock };
-
- enum TBatchMode { batAppend, batUpdate, batAppendUpdate, batDelete, batCopy };
-
- class __declspec(pascalimplementation) TTable : public Db::TDBDataSet
- {
- typedef Db::TDBDataSet inherited;
-
- private:
- TIndexDefs* FIndexDefs;
- TTableDataLink* FDataLink;
- bool FExclusive;
- bool FReadOnly;
- TTableType FTableType;
- bool FFieldsIndex;
- System::AnsiString FTableName;
- System::AnsiString FIndexName;
- Classes::TStrings* FIndexFiles;
- Bde::_hDBIObj *FLookupHandle;
- System::AnsiString FLookupKeyFields;
- Bde::_hDBIObj *FLookupCursor;
- void __fastcall DecodeIndexDesc(const Bde::IDXDesc &IndexDesc, System::AnsiString &Source, System::AnsiString &
- Name, System::AnsiString &Fields, TIndexOptions &Options);
- void __fastcall EncodeFieldDesc(Bde::FLDDesc &FieldDesc, const System::AnsiString Name, Db::TFieldType
- DataType, Word Size);
- void __fastcall EncodeIndexDesc(Bde::IDXDesc &IndexDesc, const System::AnsiString Name, const System::AnsiString
- Fields, TIndexOptions Options);
- char * __fastcall GetDriverTypeName(char * Buffer);
- System::AnsiString __fastcall GetIndexFieldNames(void);
- System::AnsiString __fastcall GetIndexName(void);
- void __fastcall GetIndexParams(const System::AnsiString IndexName, bool FieldsIndex, System::AnsiString &
- IndexedName, System::AnsiString &IndexTag);
- System::AnsiString __fastcall GetMasterFields(void);
- char * __fastcall GetTableTypeName(void);
- bool __fastcall IsDBaseTable(void);
- void __fastcall MasterChanged(void);
- void __fastcall SetDataSource(Db::TDataSource* Value);
- void __fastcall SetExclusive(bool Value);
- void __fastcall SetIndex(const System::AnsiString Value, bool FieldsIndex);
- void __fastcall SetIndexFieldNames(const System::AnsiString Value);
- void __fastcall SetIndexFiles(Classes::TStrings* Value);
- void __fastcall SetIndexName(const System::AnsiString Value);
- void __fastcall SetMasterFields(const System::AnsiString Value);
- void __fastcall SetReadOnly(bool Value);
- void __fastcall SetTableLock(TLockType LockType, bool Lock);
- void __fastcall SetTableName(const System::AnsiString Value);
- void __fastcall SetTableType(TTableType Value);
- void __fastcall UpdateIndexDefs(void);
- void __fastcall UpdateRange(void);
-
- protected:
- virtual Bde::hDBICur __fastcall CreateHandle(void);
- virtual void __fastcall DataEvent(Db::TDataEvent Event, long Info);
- virtual void __fastcall DestroyHandle(void);
- virtual void __fastcall DestroyLookupCursor(void);
- virtual void __fastcall DoOnNewRecord(void);
- virtual bool __fastcall GetCanModify(void);
- virtual Db::TDataSource* __fastcall GetDataSource(void);
- Bde::hDBICur __fastcall GetHandle(const System::AnsiString IndexName, const System::AnsiString IndexTag
- );
- System::AnsiString __fastcall GetLanguageDriverName(void);
- virtual Bde::hDBICur __fastcall GetLookupCursor(const System::AnsiString KeyFields, bool CaseInsensitive
- );
- virtual void __fastcall InitFieldDefs(void);
- bool __fastcall IsProductionIndex(const System::AnsiString IndexName);
- virtual void __fastcall PrepareCursor(void);
-
- public:
- __fastcall virtual TTable(Classes::TComponent* AOwner);
- __fastcall virtual ~TTable(void);
- long __fastcall BatchMove(Db::TDataSet* ASource, TBatchMode AMode);
- void __fastcall AddIndex(const System::AnsiString Name, const System::AnsiString Fields, TIndexOptions
- Options);
- void __fastcall ApplyRange(void);
- void __fastcall CancelRange(void);
- void __fastcall CloseIndexFile(const System::AnsiString IndexFileName);
- void __fastcall CreateTable(void);
- void __fastcall DeleteIndex(const System::AnsiString Name);
- void __fastcall DeleteTable(void);
- void __fastcall EditKey(void);
- void __fastcall EditRangeEnd(void);
- void __fastcall EditRangeStart(void);
- void __fastcall EmptyTable(void);
- bool __fastcall FindKey(const System::TVarRec * KeyValues, const int KeyValues_Size);
- void __fastcall FindNearest(const System::TVarRec * KeyValues, const int KeyValues_Size);
- void __fastcall GetIndexNames(Classes::TStrings* List);
- void __fastcall GotoCurrent(TTable* Table);
- bool __fastcall GotoKey(void);
- void __fastcall GotoNearest(void);
- void __fastcall LockTable(TLockType LockType);
- void __fastcall OpenIndexFile(const System::AnsiString IndexName);
- void __fastcall RenameTable(const System::AnsiString NewTableName);
- void __fastcall SetKey(void);
- void __fastcall SetRange(const System::TVarRec * StartValues, const int StartValues_Size, const System::TVarRec
- * EndValues, const int EndValues_Size);
- void __fastcall SetRangeEnd(void);
- void __fastcall SetRangeStart(void);
- void __fastcall UnlockTable(TLockType LockType);
- __property TIndexDefs* IndexDefs = {read=FIndexDefs, nodefault};
- __property int IndexFieldCount = {read=GetIndexFieldCount, nodefault};
- __property Db::TField* IndexFields[int Index] = {read=GetIndexField, write=SetIndexField};
- __property bool KeyExclusive = {read=GetKeyExclusive, write=SetKeyExclusive, nodefault};
- __property int KeyFieldCount = {read=GetKeyFieldCount, write=SetKeyFieldCount, nodefault};
-
- __published:
- __property bool Exclusive = {read=FExclusive, write=SetExclusive, default=0};
- __property System::AnsiString IndexFieldNames = {read=GetIndexFieldNames, write=SetIndexFieldNames,
- nodefault};
- __property Classes::TStrings* IndexFiles = {read=FIndexFiles, write=SetIndexFiles, nodefault};
- __property System::AnsiString IndexName = {read=GetIndexName, write=SetIndexName, nodefault};
- __property System::AnsiString MasterFields = {read=GetMasterFields, write=SetMasterFields, nodefault
- };
- __property Db::TDataSource* MasterSource = {read=GetDataSource, write=SetDataSource, nodefault};
- __property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, default=0};
- __property System::AnsiString TableName = {read=FTableName, write=SetTableName, nodefault};
- __property TTableType TableType = {read=FTableType, write=SetTableType, default=0};
- __property UpdateMode ;
- __property UpdateObject ;
- };
-
- class __declspec(pascalimplementation) TIndexDefs : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- TTable* FTable;
- Classes::TList* FItems;
- bool FUpdated;
- Byte FReserved;
- int __fastcall GetCount(void);
- TIndexDef* __fastcall GetIndexForFields(const System::AnsiString Fields, bool CaseInsensitive);
- TIndexDef* __fastcall GetItem(int Index);
-
- public:
- __fastcall TIndexDefs(TTable* Table);
- __fastcall virtual ~TIndexDefs(void);
- void __fastcall Add(const System::AnsiString Name, const System::AnsiString Fields, TIndexOptions Options
- );
- void __fastcall Assign(TIndexDefs* IndexDefs);
- void __fastcall Clear(void);
- TIndexDef* __fastcall FindIndexForFields(const System::AnsiString Fields);
- int __fastcall IndexOf(const System::AnsiString Name);
- void __fastcall Update(void);
- __property int Count = {read=GetCount, nodefault};
- __property TIndexDef* Items[int Index] = {read=GetItem/*, default*/};
- };
-
- class __declspec(pascalimplementation) TIndexDef : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- TIndexDefs* FOwner;
- System::AnsiString FSource;
- System::AnsiString FName;
- System::AnsiString FFields;
- TIndexOptions FOptions;
- System::AnsiString __fastcall getExpression(void);
- System::AnsiString __fastcall GetFields(void);
-
- public:
- __fastcall TIndexDef(TIndexDefs* Owner, const System::AnsiString Name, const System::AnsiString Fields
- , TIndexOptions Options);
- __fastcall virtual ~TIndexDef(void);
- __property System::AnsiString Expression = {read=getExpression, nodefault};
- __property System::AnsiString Fields = {read=GetFields, nodefault};
- __property System::AnsiString Name = {read=FName, nodefault};
- __property TIndexOptions Options = {read=FOptions, nodefault};
- __property System::AnsiString Source = {read=FSource, nodefault};
- };
-
- class __declspec(delphiclass) TIndexFiles;
- class __declspec(pascalimplementation) TIndexFiles : public Classes::TStringList
- {
- typedef Classes::TStringList inherited;
-
- private:
- TTable* FOwner;
-
- public:
- __fastcall TIndexFiles(TTable* AOwner);
- virtual int __fastcall Add(const System::AnsiString S);
- virtual void __fastcall Clear(void);
- virtual void __fastcall Delete(int Index);
- virtual void __fastcall Insert(int Index, const System::AnsiString S);
- public:
- /* TStringList.Destroy */ __fastcall virtual ~TIndexFiles(void) { }
-
- };
-
- class __declspec(delphiclass) TBatchMove;
- class __declspec(pascalimplementation) TBatchMove : public Classes::TComponent
- {
- typedef Classes::TComponent inherited;
-
- private:
- TTable* FDestination;
- Db::TDataSet* FSource;
- TBatchMode FMode;
- bool FAbortOnKeyViol;
- bool FAbortOnProblem;
- bool FTransliterate;
- long FRecordCount;
- long FMovedCount;
- long FKeyViolCount;
- long FProblemCount;
- long FChangedCount;
- Classes::TStrings* FMappings;
- System::AnsiString FKeyViolTableName;
- System::AnsiString FProblemTableName;
- System::AnsiString FChangedTableName;
- int FCommitCount;
- char * __fastcall ConvertName(const System::AnsiString Name, char * Buffer);
- void __fastcall SetDesination(TTable* Value);
- void __fastcall SetMappings(Classes::TStrings* Value);
- void __fastcall SetSource(Db::TDataSet* Value);
-
- protected:
- virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
- );
-
- public:
- __fastcall virtual TBatchMove(Classes::TComponent* AOwner);
- __fastcall virtual ~TBatchMove(void);
- void __fastcall Execute(void);
- __property long ChangedCount = {read=FChangedCount, nodefault};
- __property long KeyViolCount = {read=FKeyViolCount, nodefault};
- __property long MovedCount = {read=FMovedCount, nodefault};
- __property long ProblemCount = {read=FProblemCount, nodefault};
-
- __published:
- __property bool AbortOnKeyViol = {read=FAbortOnKeyViol, write=FAbortOnKeyViol, default=1};
- __property bool AbortOnProblem = {read=FAbortOnProblem, write=FAbortOnProblem, default=1};
- __property int CommitCount = {read=FCommitCount, write=FCommitCount, default=0};
- __property System::AnsiString ChangedTableName = {read=FChangedTableName, write=FChangedTableName,
- nodefault};
- __property TTable* Destination = {read=FDestination, write=FDestination, nodefault};
- __property System::AnsiString KeyViolTableName = {read=FKeyViolTableName, write=FKeyViolTableName,
- nodefault};
- __property Classes::TStrings* Mappings = {read=FMappings, write=SetMappings, nodefault};
- __property TBatchMode Mode = {read=FMode, write=FMode, default=0};
- __property System::AnsiString ProblemTableName = {read=FProblemTableName, write=FProblemTableName,
- nodefault};
- __property long RecordCount = {read=FRecordCount, write=FRecordCount, default=0};
- __property Db::TDataSet* Source = {read=FSource, write=SetSource, nodefault};
- __property bool Transliterate = {read=FTransliterate, write=FTransliterate, default=1};
- };
-
- enum TParamType { ptUnknown, ptInput, ptOutput, ptInputOutput, ptResult };
-
- class __declspec(delphiclass) TParam;
- class __declspec(delphiclass) TParams;
- class __declspec(pascalimplementation) TParams : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- Classes::TList* FItems;
- TParam* __fastcall GetParam(Word Index);
- System::Variant __fastcall GetParamValue(const System::AnsiString ParamName);
- Word __fastcall GetVersion(void);
- void __fastcall ReadBinaryData(Classes::TStream* Stream);
- void __fastcall SetParamValue(const System::AnsiString ParamName, const System::Variant &Value);
- void __fastcall WriteBinaryData(Classes::TStream* Stream);
-
- protected:
- virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
- virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
-
- public:
- __fastcall virtual TParams(void);
- __fastcall virtual ~TParams(void);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- void __fastcall AssignValues(TParams* Value);
- void __fastcall AddParam(TParam* Value);
- void __fastcall RemoveParam(TParam* Value);
- TParam* __fastcall CreateParam(Db::TFieldType FldType, const System::AnsiString ParamName, TParamType
- ParamType);
- int __fastcall Count(void);
- void __fastcall Clear(void);
- void __fastcall GetParamList(Classes::TList* List, const System::AnsiString ParamNames);
- bool __fastcall IsEqual(TParams* Value);
- TParam* __fastcall ParamByName(const System::AnsiString Value);
- __property TParam* Items[Word Index] = {read=GetParam/*, default*/};
- __property System::Variant ParamValues[System::AnsiString ParamName] = {read=GetParamValue, write=SetParamValue
- };
- };
-
- class __declspec(pascalimplementation) TParam : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- TParams* FParamList;
- System::Variant FData;
- System::AnsiString FName;
- TFieldType FDataType;
- bool FNull;
- bool FBound;
- TParamType FParamType;
- void __fastcall AccessError(void);
- void __fastcall InitValue(void);
-
- protected:
- System::Currency __fastcall GetAsBCD(void);
- bool __fastcall GetAsBoolean(void);
- System::TDateTime __fastcall GetAsDateTime(void);
- double __fastcall GetAsFloat(void);
- long __fastcall GetAsInteger(void);
- System::AnsiString __fastcall GetAsString(void);
- System::Variant __fastcall GetAsVariant(void);
- bool __fastcall IsEqual(TParam* Value);
- void __fastcall SetAsBCD(System::Currency Value);
- void __fastcall SetAsBoolean(bool Value);
- void __fastcall SetAsCurrency(double Value);
- void __fastcall SetAsDate(System::TDateTime Value);
- void __fastcall SetAsDateTime(System::TDateTime Value);
- void __fastcall SetAsFloat(double Value);
- void __fastcall SetAsInteger(long Value);
- void __fastcall SetAsString(const System::AnsiString Value);
- void __fastcall SetAsSmallInt(long Value);
- void __fastcall SetAsTime(System::TDateTime Value);
- void __fastcall SetAsVariant(const System::Variant &Value);
- void __fastcall SetAsWord(long Value);
- void __fastcall SetDataType(Db::TFieldType Value);
- void __fastcall SetText(const System::AnsiString Value);
-
- public:
- __fastcall TParam(TParams* AParamList, TParamType AParamType);
- __fastcall virtual ~TParam(void);
- void __fastcall Assign(TParam* Param);
- void __fastcall AssignField(Db::TField* Field);
- void __fastcall AssignFieldValue(Db::TField* Field, const System::Variant &Value);
- void __fastcall Clear(void);
- void __fastcall GetData(void * Buffer);
- Word __fastcall GetDataSize(void);
- void __fastcall SetData(void * Buffer);
- __property System::Currency AsBCD = {read=GetAsBCD, write=SetAsBCD};
- __property bool AsBoolean = {read=GetAsBoolean, write=SetAsBoolean, nodefault};
- __property double AsCurrency = {read=GetAsFloat, write=SetAsCurrency};
- __property System::TDateTime AsDate = {read=GetAsDateTime, write=SetAsDate};
- __property System::TDateTime AsDateTime = {read=GetAsDateTime, write=SetAsDateTime};
- __property double AsFloat = {read=GetAsFloat, write=SetAsFloat};
- __property long AsInteger = {read=GetAsInteger, write=SetAsInteger, nodefault};
- __property long AsSmallInt = {read=GetAsInteger, write=SetAsSmallInt, nodefault};
- __property System::AnsiString AsString = {read=GetAsString, write=SetAsString, nodefault};
- __property System::TDateTime AsTime = {read=GetAsDateTime, write=SetAsTime};
- __property long AsWord = {read=GetAsInteger, write=SetAsWord, nodefault};
- __property bool Bound = {read=FBound, write=FBound, nodefault};
- __property Db::TFieldType DataType = {read=FDataType, write=SetDataType, nodefault};
- __property bool IsNull = {read=FNull, nodefault};
- __property System::AnsiString Name = {read=FName, write=FName, nodefault};
- __property TParamType ParamType = {read=FParamType, write=FParamType, nodefault};
- __property System::AnsiString Text = {read=GetAsString, write=SetText, nodefault};
- __property System::Variant Value = {read=GetAsVariant, write=SetAsVariant};
- };
-
- struct TServerDesc;
- typedef TServerDesc *PServerDesc;
-
- #pragma pack(push, 1)
- struct TServerDesc
- {
- System::SmallString<64> ParamName;
- TFieldType BindType;
- } ;
- #pragma pack(pop)
-
- enum TParamBindMode { pbByName, pbByNumber };
-
- class __declspec(delphiclass) TStoredProc;
- class __declspec(pascalimplementation) TStoredProc : public Db::TDBDataSet
- {
- typedef Db::TDBDataSet inherited;
-
- private:
- Bde::_hDBIObj *FStmtHandle;
- System::AnsiString FProcName;
- TParams* FParams;
- char *FParamDesc;
- char *FRecordBuffer;
- Word FOverLoad;
- bool FPrepared;
- bool FQueryMode;
- char *FServerDescs;
- TParamBindMode FBindMode;
- void __fastcall BindParams(void);
- bool __fastcall CheckServerParams(void);
- Bde::hDBICur __fastcall CreateCursor(bool GenHandle);
- void __fastcall CreateParamDesc(void);
- void __fastcall FreeStatement(void);
- Bde::hDBICur __fastcall GetCursor(bool GenHandle);
- void __fastcall PrepareProc(void);
- void __fastcall SetParamsList(TParams* Value);
- void __fastcall SetServerParams(void);
-
- protected:
- virtual Bde::hDBICur __fastcall CreateHandle(void);
- virtual void __fastcall Disconnect(void);
- Word __fastcall GetParamsCount(void);
- virtual void __fastcall SetDBFlag(int Flag, bool Value);
- void __fastcall SetOverLoad(Word Value);
- void __fastcall SetProcName(const System::AnsiString Value);
- void __fastcall SetPrepared(bool Value);
- void __fastcall SetPrepare(bool Value);
-
- public:
- __fastcall virtual TStoredProc(Classes::TComponent* AOwner);
- __fastcall virtual ~TStoredProc(void);
- void __fastcall CopyParams(TParams* Value);
- bool __fastcall DescriptionsAvailable(void);
- void __fastcall ExecProc(void);
- TParam* __fastcall ParamByName(const System::AnsiString Value);
- void __fastcall Prepare(void);
- void __fastcall GetResults(void);
- void __fastcall UnPrepare(void);
- __property Word ParamCount = {read=GetParamsCount, nodefault};
- __property Bde::hDBIStmt StmtHandle = {read=FStmtHandle, nodefault};
- __property bool Prepared = {read=FPrepared, write=SetPrepare, nodefault};
-
- __published:
- __property System::AnsiString StoredProcName = {read=FProcName, write=SetProcName, nodefault};
- __property Word Overload = {read=FOverLoad, write=SetOverLoad, default=0};
- __property TParams* Params = {read=FParams, write=SetParamsList, nodefault};
- __property TParamBindMode ParamBindMode = {read=FBindMode, write=FBindMode, default=0};
- __property UpdateObject ;
- };
-
- class __declspec(delphiclass) TQuery;
- class __declspec(pascalimplementation) TQuery : public Db::TDBDataSet
- {
- typedef Db::TDBDataSet inherited;
-
- private:
- Bde::_hDBIObj *FStmtHandle;
- Classes::TStrings* FSQL;
- bool FPrepared;
- TParams* FParams;
- System::AnsiString FText;
- Db::TDataLink* FDataLink;
- bool FLocal;
- int FRowsAffected;
- bool FUniDirectional;
- bool FRequestLive;
- char *FSQLBinary;
- bool FConstrained;
- bool FParamCheck;
- Bde::hDBICur __fastcall CreateCursor(bool GenHandle);
- void __fastcall CreateParams(TParams* List, char * const Value);
- virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
- void __fastcall FreeStatement(void);
- Bde::hDBICur __fastcall GetQueryCursor(bool GenHandle);
- void __fastcall GetStatementHandle(char * SQLText);
- char * __fastcall GetSQLText(void);
- int __fastcall GetRowsAffected(void);
- void __fastcall PrepareSQL(char * Value);
- void __fastcall QueryChanged(System::TObject* Sender);
- void __fastcall ReadBinaryData(Classes::TStream* Stream);
- void __fastcall RefreshParams(void);
- void __fastcall SetDataSource(Db::TDataSource* Value);
- void __fastcall SetQuery(Classes::TStrings* Value);
- void __fastcall SetParamsList(TParams* Value);
- void __fastcall SetParams(void);
- void __fastcall SetParamsFromCursor(void);
- void __fastcall SetPrepared(bool Value);
- void __fastcall SetPrepare(bool Value);
- void __fastcall WriteBinaryData(Classes::TStream* Stream);
-
- protected:
- virtual Bde::hDBICur __fastcall CreateHandle(void);
- virtual void __fastcall Disconnect(void);
- virtual Db::TDataSource* __fastcall GetDataSource(void);
- Word __fastcall GetParamsCount(void);
- virtual void __fastcall SetDBFlag(int Flag, bool Value);
-
- public:
- __fastcall virtual TQuery(Classes::TComponent* AOwner);
- __fastcall virtual ~TQuery(void);
- void __fastcall ExecSQL(void);
- TParam* __fastcall ParamByName(const System::AnsiString Value);
- void __fastcall Prepare(void);
- void __fastcall UnPrepare(void);
- __property bool Prepared = {read=FPrepared, write=SetPrepare, nodefault};
- __property Word ParamCount = {read=GetParamsCount, nodefault};
- __property bool Local = {read=FLocal, nodefault};
- __property Bde::hDBIStmt StmtHandle = {read=FStmtHandle, nodefault};
- __property System::AnsiString Text = {read=FText, nodefault};
- __property int RowsAffected = {read=GetRowsAffected, nodefault};
- __property char * SQLBinary = {read=FSQLBinary, write=FSQLBinary, nodefault};
-
- __published:
- __property bool Constrained = {read=FConstrained, write=FConstrained, default=0};
- __property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
- __property TParams* Params = {read=FParams, write=SetParamsList, nodefault};
- __property bool ParamCheck = {read=FParamCheck, write=FParamCheck, default=1};
- __property bool RequestLive = {read=FRequestLive, write=FRequestLive, default=0};
- __property Classes::TStrings* SQL = {read=FSQL, write=SetQuery, nodefault};
- __property bool UniDirectional = {read=FUniDirectional, write=FUniDirectional, default=0};
- __property UpdateMode ;
- __property UpdateObject ;
- };
-
- class __declspec(delphiclass) TUpdateSQL;
- class __declspec(pascalimplementation) TUpdateSQL : public Db::TDataSetUpdateObject
- {
- typedef Db::TDataSetUpdateObject inherited;
-
- private:
- Db::TDataSet* FDataSet;
- TQuery* FQueries[3];
- Classes::TStrings* FSQLText[3];
- TQuery* __fastcall GetQuery(Db::TUpdateKind UpdateKind);
- Classes::TStrings* __fastcall GetSQL(Db::TUpdateKind UpdateKind);
- Classes::TStrings* __fastcall GetSQLIndex(int Index);
- void __fastcall SetSQL(Db::TUpdateKind UpdateKind, Classes::TStrings* Value);
- void __fastcall SetSQLIndex(int Index, Classes::TStrings* Value);
-
- protected:
- virtual Db::TDataSet* __fastcall GetDataSet(void);
- virtual void __fastcall SetDataSet(Db::TDataSet* ADataSet);
-
- public:
- __fastcall virtual TUpdateSQL(Classes::TComponent* AOwner);
- __fastcall virtual ~TUpdateSQL(void);
- virtual void __fastcall Apply(Db::TUpdateKind UpdateKind);
- void __fastcall ExecSQL(Db::TUpdateKind UpdateKind);
- void __fastcall SetParams(Db::TUpdateKind UpdateKind);
- __property DataSet ;
- __property TQuery* Query[Db::TUpdateKind UpdateKind] = {read=GetQuery};
- __property Classes::TStrings* SQL[Db::TUpdateKind UpdateKind] = {read=GetSQL, write=SetSQL};
-
- __published:
- __property Classes::TStrings* ModifySQL = {read=GetSQLIndex, write=SetSQLIndex, index=0, nodefault}
- ;
- __property Classes::TStrings* InsertSQL = {read=GetSQLIndex, write=SetSQLIndex, index=1, nodefault}
- ;
- __property Classes::TStrings* DeleteSQL = {read=GetSQLIndex, write=SetSQLIndex, index=2, nodefault}
- ;
- };
-
- class __declspec(delphiclass) TStringField;
- class __declspec(pascalimplementation) TStringField : public Db::TField
- {
- typedef Db::TField inherited;
-
- private:
- bool FTransliterate;
- Byte FReserved;
-
- protected:
- virtual bool __fastcall GetAsBoolean(void);
- virtual System::TDateTime __fastcall GetAsDateTime(void);
- virtual double __fastcall GetAsFloat(void);
- virtual long __fastcall GetAsInteger(void);
- virtual System::AnsiString __fastcall GetAsString(void);
- virtual System::Variant __fastcall GetAsVariant(void);
- virtual int __fastcall GetDefaultWidth(void);
- virtual void __fastcall GetText( System::AnsiString &Text, bool DisplayText);
- bool __fastcall GetValue( System::AnsiString &Value);
- virtual void __fastcall SetAsBoolean(bool Value);
- virtual void __fastcall SetAsDateTime(System::TDateTime Value);
- virtual void __fastcall SetAsFloat(double Value);
- virtual void __fastcall SetAsInteger(long Value);
- virtual void __fastcall SetAsString(const System::AnsiString Value);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
-
- public:
- __fastcall virtual TStringField(Classes::TComponent* AOwner);
- __property System::AnsiString Value = {read=GetAsString, write=SetAsString, nodefault};
-
- __published:
- __property EditMask ;
- __property Size ;
- __property bool Transliterate = {read=FTransliterate, write=FTransliterate, default=1};
- public:
- /* TField.Destroy */ __fastcall virtual ~TStringField(void) { }
-
- };
-
- class __declspec(delphiclass) TNumericField;
- class __declspec(pascalimplementation) TNumericField : public Db::TField
- {
- typedef Db::TField inherited;
-
- private:
- System::AnsiString FDisplayFormat;
- System::AnsiString FEditFormat;
- void __fastcall RangeError(Extended Value, Extended Min, Extended Max);
- void __fastcall SetDisplayFormat(const System::AnsiString Value);
- void __fastcall SetEditFormat(const System::AnsiString Value);
-
- public:
- __fastcall virtual TNumericField(Classes::TComponent* AOwner);
-
- __published:
- __property Alignment ;
- __property System::AnsiString DisplayFormat = {read=FDisplayFormat, write=SetDisplayFormat, nodefault
- };
- __property System::AnsiString EditFormat = {read=FEditFormat, write=SetEditFormat, nodefault};
- public:
-
- /* TField.Destroy */ __fastcall virtual ~TNumericField(void) { }
-
- };
-
- class __declspec(delphiclass) TIntegerField;
- class __declspec(pascalimplementation) TIntegerField : public TNumericField
- {
- typedef TNumericField inherited;
-
- private:
- long FMinRange;
- long FMaxRange;
- long FMinValue;
- long FMaxValue;
- void __fastcall CheckRange(long Value, long Min, long Max);
- void __fastcall SetMaxValue(long Value);
- void __fastcall SetMinValue(long Value);
-
- protected:
- virtual double __fastcall GetAsFloat(void);
- virtual long __fastcall GetAsInteger(void);
- virtual System::AnsiString __fastcall GetAsString(void);
- virtual System::Variant __fastcall GetAsVariant(void);
- virtual void __fastcall GetText( System::AnsiString &Text, bool DisplayText);
- bool __fastcall GetValue(long &Value);
- virtual void __fastcall SetAsFloat(double Value);
- virtual void __fastcall SetAsInteger(long Value);
- virtual void __fastcall SetAsString(const System::AnsiString Value);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
-
- public:
- __fastcall virtual TIntegerField(Classes::TComponent* AOwner);
- virtual bool __fastcall IsValidChar(char Ch);
- __property long Value = {read=GetAsInteger, write=SetAsInteger, nodefault};
-
- __published:
- __property long MaxValue = {read=FMaxValue, write=SetMaxValue, default=0};
- __property long MinValue = {read=FMinValue, write=SetMinValue, default=0};
- public:
- /* TField.Destroy */ __fastcall virtual ~TIntegerField(void) { }
-
- };
-
- class __declspec(delphiclass) TSmallintField;
- class __declspec(pascalimplementation) TSmallintField : public TIntegerField
- {
- typedef TIntegerField inherited;
-
- public:
- __fastcall virtual TSmallintField(Classes::TComponent* AOwner);
- public:
- /* TField.Destroy */ __fastcall virtual ~TSmallintField(void) { }
-
- };
-
- class __declspec(delphiclass) TWordField;
- class __declspec(pascalimplementation) TWordField : public TIntegerField
- {
- typedef TIntegerField inherited;
-
- public:
- __fastcall virtual TWordField(Classes::TComponent* AOwner);
- public:
- /* TField.Destroy */ __fastcall virtual ~TWordField(void) { }
-
- };
-
- class __declspec(delphiclass) TAutoIncField;
- class __declspec(pascalimplementation) TAutoIncField : public TIntegerField
- {
- typedef TIntegerField inherited;
-
- public:
- __fastcall virtual TAutoIncField(Classes::TComponent* AOwner);
- public:
- /* TField.Destroy */ __fastcall virtual ~TAutoIncField(void) { }
-
- };
-
- class __declspec(delphiclass) TFloatField;
- class __declspec(pascalimplementation) TFloatField : public TNumericField
- {
- typedef TNumericField inherited;
-
- private:
- bool FCurrency;
- bool FCheckRange;
- int FPrecision;
- double FMinValue;
- double FMaxValue;
- void __fastcall SetCurrency(bool Value);
- void __fastcall SetMaxValue(double Value);
- void __fastcall SetMinValue(double Value);
- void __fastcall SetPrecision(int Value);
- void __fastcall UpdateCheckRange(void);
-
- protected:
- virtual double __fastcall GetAsFloat(void);
- virtual long __fastcall GetAsInteger(void);
- virtual System::AnsiString __fastcall GetAsString(void);
- virtual System::Variant __fastcall GetAsVariant(void);
- virtual void __fastcall GetText( System::AnsiString &Text, bool DisplayText);
- virtual void __fastcall SetAsFloat(double Value);
- virtual void __fastcall SetAsInteger(long Value);
- virtual void __fastcall SetAsString(const System::AnsiString Value);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
-
- public:
- __fastcall virtual TFloatField(Classes::TComponent* AOwner);
- virtual bool __fastcall IsValidChar(char Ch);
- __property double Value = {read=GetAsFloat, write=SetAsFloat};
-
- __published:
- __property bool currency = {read=FCurrency, write=SetCurrency, default=0};
- __property double MaxValue = {read=FMaxValue, write=SetMaxValue};
- __property double MinValue = {read=FMinValue, write=SetMinValue};
- __property int Precision = {read=FPrecision, write=SetPrecision, default=15};
- public:
- /* TField.Destroy */ __fastcall virtual ~TFloatField(void) { }
-
- };
-
- class __declspec(delphiclass) TCurrencyField;
- class __declspec(pascalimplementation) TCurrencyField : public TFloatField
- {
- typedef TFloatField inherited;
-
- public:
- __fastcall virtual TCurrencyField(Classes::TComponent* AOwner);
-
- __published:
- __property currency ;
- public:
- /* TField.Destroy */ __fastcall virtual ~TCurrencyField(void) { }
-
- };
-
- class __declspec(delphiclass) TBCDField;
- class __declspec(pascalimplementation) TBCDField : public TNumericField
- {
- typedef TNumericField inherited;
-
- public:
- bool FCurrency;
- bool FCheckRange;
- System::Currency FMinValue;
- System::Currency FMaxValue;
- void __fastcall SetCurrency(bool Value);
- void __fastcall SetMaxValue(System::Currency Value);
- void __fastcall SetMinValue(System::Currency Value);
- void __fastcall UpdateCheckRange(void);
-
- protected:
- virtual System::Currency __fastcall GetAsCurrency(void);
- virtual double __fastcall GetAsFloat(void);
- virtual long __fastcall GetAsInteger(void);
- virtual System::AnsiString __fastcall GetAsString(void);
- virtual System::Variant __fastcall GetAsVariant(void);
- virtual void __fastcall GetText( System::AnsiString &Text, bool DisplayText);
- bool __fastcall GetValue(System::Currency &Value);
- virtual void __fastcall SetAsCurrency(System::Currency Value);
- virtual void __fastcall SetAsFloat(double Value);
- virtual void __fastcall SetAsInteger(long Value);
- virtual void __fastcall SetAsString(const System::AnsiString Value);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
-
- public:
- __fastcall virtual TBCDField(Classes::TComponent* AOwner);
- virtual bool __fastcall IsValidChar(char Ch);
- __property System::Currency Value = {read=GetAsCurrency, write=SetAsCurrency};
-
- __published:
- __property bool currency = {read=FCurrency, write=SetCurrency, default=0};
- __property System::Currency MaxValue = {read=FMaxValue, write=SetMaxValue};
- __property System::Currency MinValue = {read=FMinValue, write=SetMinValue};
- __property Size ;
- public:
- /* TField.Destroy */ __fastcall virtual ~TBCDField(void) { }
-
- };
-
- typedef System::AnsiString DBTables_32[2];
-
- class __declspec(delphiclass) TBooleanField;
- class __declspec(pascalimplementation) TBooleanField : public Db::TField
- {
- typedef Db::TField inherited;
-
- private:
- System::AnsiString FDisplayValues;
- System::AnsiString FTextValues[2];
- void __fastcall LoadTextValues(void);
- void __fastcall SetDisplayValues(const System::AnsiString Value);
-
- protected:
- virtual bool __fastcall GetAsBoolean(void);
- virtual System::AnsiString __fastcall GetAsString(void);
- virtual System::Variant __fastcall GetAsVariant(void);
- virtual int __fastcall GetDefaultWidth(void);
- virtual void __fastcall SetAsBoolean(bool Value);
- virtual void __fastcall SetAsString(const System::AnsiString Value);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
-
- public:
- __fastcall virtual TBooleanField(Classes::TComponent* AOwner);
- __property bool Value = {read=GetAsBoolean, write=SetAsBoolean, nodefault};
-
- __published:
- __property System::AnsiString DisplayValues = {read=FDisplayValues, write=SetDisplayValues, nodefault
- };
- public:
- /* TField.Destroy */ __fastcall virtual ~TBooleanField(void) { }
-
- };
-
- class __declspec(delphiclass) TDateTimeField;
- class __declspec(pascalimplementation) TDateTimeField : public Db::TField
- {
- typedef Db::TField inherited;
-
- private:
- System::AnsiString FDisplayFormat;
- bool __fastcall GetValue(System::TDateTime &Value);
- void __fastcall SetDisplayFormat(const System::AnsiString Value);
-
- protected:
- virtual System::TDateTime __fastcall GetAsDateTime(void);
- virtual double __fastcall GetAsFloat(void);
- virtual System::AnsiString __fastcall GetAsString(void);
- virtual System::Variant __fastcall GetAsVariant(void);
- virtual void __fastcall GetText( System::AnsiString &Text, bool DisplayText);
- virtual void __fastcall SetAsDateTime(System::TDateTime Value);
- virtual void __fastcall SetAsFloat(double Value);
- virtual void __fastcall SetAsString(const System::AnsiString Value);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
-
- public:
- __fastcall virtual TDateTimeField(Classes::TComponent* AOwner);
- __property System::TDateTime Value = {read=GetAsDateTime, write=SetAsDateTime};
-
- __published:
- __property System::AnsiString DisplayFormat = {read=FDisplayFormat, write=SetDisplayFormat, nodefault
- };
- __property EditMask ;
- public:
- /* TField.Destroy */ __fastcall virtual ~TDateTimeField(void) { }
-
- };
-
- class __declspec(delphiclass) TDateField;
- class __declspec(pascalimplementation) TDateField : public TDateTimeField
- {
- typedef TDateTimeField inherited;
-
- public:
- __fastcall virtual TDateField(Classes::TComponent* AOwner);
- public:
- /* TField.Destroy */ __fastcall virtual ~TDateField(void) { }
-
- };
-
- class __declspec(delphiclass) TTimeField;
- class __declspec(pascalimplementation) TTimeField : public TDateTimeField
- {
- typedef TDateTimeField inherited;
-
- public:
- __fastcall virtual TTimeField(Classes::TComponent* AOwner);
- public:
- /* TField.Destroy */ __fastcall virtual ~TTimeField(void) { }
-
- };
-
- class __declspec(delphiclass) TBinaryField;
- class __declspec(pascalimplementation) TBinaryField : public Db::TField
- {
- typedef Db::TField inherited;
-
- protected:
- virtual System::Variant __fastcall GetAsVariant(void);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
-
- public:
- __fastcall virtual TBinaryField(Classes::TComponent* AOwner);
-
- __published:
- __property Size ;
- public:
- /* TField.Destroy */ __fastcall virtual ~TBinaryField(void) { }
-
- };
-
- class __declspec(delphiclass) TBytesField;
- class __declspec(pascalimplementation) TBytesField : public TBinaryField
- {
- typedef TBinaryField inherited;
-
- public:
- __fastcall virtual TBytesField(Classes::TComponent* AOwner);
- public:
- /* TField.Destroy */ __fastcall virtual ~TBytesField(void) { }
-
- };
-
- class __declspec(delphiclass) TVarBytesField;
- class __declspec(pascalimplementation) TVarBytesField : public TBytesField
- {
- typedef TBytesField inherited;
-
- public:
- __fastcall virtual TVarBytesField(Classes::TComponent* AOwner);
- public:
- /* TField.Destroy */ __fastcall virtual ~TVarBytesField(void) { }
-
- };
-
- typedef TFieldType TBlobType;
-
- class __declspec(delphiclass) TBlobField;
- class __declspec(pascalimplementation) TBlobField : public Db::TField
- {
- typedef Db::TField inherited;
-
- private:
- bool FModified;
- bool FTransliterate;
- TBlobType __fastcall GetBlobType(void);
- void __fastcall LoadFromBlob(TBlobField* Blob);
- void __fastcall LoadFromBitmap(Graphics::TBitmap* Bitmap);
- void __fastcall LoadFromStrings(Classes::TStrings* Strings);
- void __fastcall SaveToBitmap(Graphics::TBitmap* Bitmap);
- void __fastcall SaveToStrings(Classes::TStrings* Strings);
- void __fastcall SetBlobType(TBlobType Value);
-
- protected:
- virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
- virtual void __fastcall FreeBuffers(void);
- virtual System::AnsiString __fastcall GetAsString(void);
- virtual System::Variant __fastcall GetAsVariant(void);
- virtual void __fastcall GetText( System::AnsiString &Text, bool DisplayText);
- virtual void __fastcall SetAsString(const System::AnsiString Value);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
- __property bool Transliterate = {read=FTransliterate, write=FTransliterate, default=1};
-
- public:
- __fastcall virtual TBlobField(Classes::TComponent* AOwner);
- virtual void __fastcall Assign(Classes::TPersistent* Source);
- virtual void __fastcall Clear(void);
- void __fastcall LoadFromFile(const System::AnsiString FileName);
- void __fastcall LoadFromStream(Classes::TStream* Stream);
- void __fastcall SaveToFile(const System::AnsiString FileName);
- void __fastcall SaveToStream(Classes::TStream* Stream);
- virtual void __fastcall SetFieldType(Db::TFieldType Value);
- virtual void __fastcall SetText(const System::AnsiString Value);
- __property System::AnsiString Value = {read=GetAsString, write=SetAsString, nodefault};
-
- __published:
- __property TBlobType BlobType = {read=GetBlobType, write=SetBlobType, nodefault};
- __property Size ;
- public:
- /* TField.Destroy */ __fastcall virtual ~TBlobField(void) { }
-
- };
-
- class __declspec(delphiclass) TMemoField;
- class __declspec(pascalimplementation) TMemoField : public TBlobField
- {
- typedef TBlobField inherited;
-
- public:
- __fastcall virtual TMemoField(Classes::TComponent* AOwner);
-
- __published:
- __property Transliterate ;
- public:
- /* TField.Destroy */ __fastcall virtual ~TMemoField(void) { }
-
- };
-
- class __declspec(delphiclass) TGraphicField;
- class __declspec(pascalimplementation) TGraphicField : public TBlobField
- {
- typedef TBlobField inherited;
-
- public:
- __fastcall virtual TGraphicField(Classes::TComponent* AOwner);
- public:
- /* TField.Destroy */ __fastcall virtual ~TGraphicField(void) { }
-
- };
-
- enum TBlobStreamMode { bmRead, bmWrite, bmReadWrite };
-
- class __declspec(delphiclass) TBlobStream;
- class __declspec(pascalimplementation) TBlobStream : public Classes::TStream
- {
- typedef Classes::TStream inherited;
-
- private:
- TBlobField* FField;
- Db::TDataSet* FDataSet;
- char *FRecord;
- char *FBuffer;
- int FFieldNo;
- bool FOpened;
- bool FModified;
- long FPosition;
- long __fastcall GetBlobSize(void);
-
- public:
- __fastcall TBlobStream(TBlobField* Field, TBlobStreamMode Mode);
- __fastcall virtual ~TBlobStream(void);
- virtual long __fastcall Read(void *Buffer, long Count);
- virtual long __fastcall Write(const void *Buffer, long Count);
- virtual long __fastcall Seek(long Offset, Word Origin);
- void __fastcall Truncate(void);
- };
-
- class __declspec(delphiclass) TFieldDataLink;
- class __declspec(pascalimplementation) TFieldDataLink : public Db::TDataLink
- {
- typedef Db::TDataLink inherited;
-
- private:
- Db::TField* FField;
- System::AnsiString FFieldName;
- Controls::TWinControl* FControl;
- bool FEditing;
- bool FModified;
- Classes::TNotifyEvent FOnDataChange;
- Classes::TNotifyEvent FOnEditingChange;
- Classes::TNotifyEvent FOnUpdateData;
- Classes::TNotifyEvent FOnActiveChange;
- bool __fastcall GetCanModify(void);
- HIDESBASE void __fastcall SetEditing(bool Value);
- void __fastcall SetField(Db::TField* Value);
- void __fastcall SetFieldName(const System::AnsiString Value);
- void __fastcall UpdateField(void);
-
- protected:
- virtual void __fastcall ActiveChanged(void);
- virtual void __fastcall EditingChanged(void);
- virtual void __fastcall FocusControl(Db::TFieldRef Field);
- virtual void __fastcall LayoutChanged(void);
- virtual void __fastcall RecordChanged(Db::TField* Field);
- virtual void __fastcall UpdateData(void);
-
- public:
- HIDESBASE bool __fastcall Edit(void);
- void __fastcall Modified(void);
- void __fastcall Reset(void);
- __property bool CanModify = {read=GetCanModify, nodefault};
- __property Controls::TWinControl* Control = {read=FControl, write=FControl, nodefault};
- __property bool Editing = {read=FEditing, nodefault};
- __property Db::TField* Field = {read=FField, nodefault};
- __property System::AnsiString FieldName = {read=FFieldName, write=SetFieldName, nodefault};
- __property Classes::TNotifyEvent OnDataChange = {read=FOnDataChange, write=FOnDataChange};
- __property Classes::TNotifyEvent OnEditingChange = {read=FOnEditingChange, write=FOnEditingChange};
-
- __property Classes::TNotifyEvent OnUpdateData = {read=FOnUpdateData, write=FOnUpdateData};
- __property Classes::TNotifyEvent OnActiveChange = {read=FOnActiveChange, write=FOnActiveChange};
- public:
-
- /* TDataLink.Create */ __fastcall TFieldDataLink(void) : Db::TDataLink() { }
- /* TDataLink.Destroy */ __fastcall virtual ~TFieldDataLink(void) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- extern bool __fastcall BCDToCurr(const Bde::FMTBcd &BCD, System::Currency &Curr);
- extern bool __fastcall CurrToBCD(System::Currency Curr, Bde::FMTBcd &BCD, int Precision, int Decimals
- );
- //-- template instantiations -------------------------------------------------
- template class SmallString<64> ;
- template class TIndexOptions ;
-
- } /* namespace Dbtables */
-
- #pragma warn .par
- #pragma warn .hid
- #pragma warn .inl
-
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Dbtables;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // DBTables
-